{% extends 'common/goodspublic.html' %}
{% load static %}

{% block title %}
    订单
{% endblock %}

{% block head %}
    <link href="{% static 'css/check.css' %}" rel="stylesheet" type="text/css"/>
{% endblock %}

{% block header %}
    <header data-am-widget="header" class="am-header am-header-default sq-head ">
        <div class="am-header-left am-header-nav">
            <a href="javascript:history.back()" class="">
                <i class="am-icon-chevron-left"></i>
            </a>
        </div>
        <h1 class="am-header-title">
            <a href="" class="">全部订单</a>
        </h1>
    </header>
{% endblock %}

{% block content %}
    <div style="height: 49px;"></div>
    <ul class="order-style">
        <li class="current"><a href="allorder.html">全部</a></li>
        <li id="order1" value="0"><a href="allorder.html">待付款</a></li>
        <li id="order2" value="5"><a href="allorder.html">退发货</a></li>
        <li id="order3" value="2"><a href="allorder.html">待收货</a></li>
        <li id="order4" value="3"><a href="allorder.html">待评价</a></li>

    </ul>
    {% for order in orders %}
        {% if order.order_status == 0 %}
            <!--待付款-->
            <div class="c-comment">
                <span class="c-comment-num">未支付</span>
                <span class="c-comment-suc">待付款</span>
            </div>

            <div class="c-comment-list" style="border: 0;">
                <a href="orderdetail.html">
                    <p>应付金额：￥{{ order.order_price }}</p>
                    <p>实付金额：<span>￥{{ order.pay_money }}</span><b>省</b><span>￥0.0</span></p>
                    <p>订单编号：{{ order.number }}</p>
                    <p>下单时间：{{ order.create_time }}</p>
                </a>
            </div>
            <div class="c-com-btn">
                <a href="{% url 'orders:支付' %}?number={{ order.number }}" class="oncepay">立即支付</a>
                <a href="" class="canelpay">取消订单</a>
            </div>
            <div class="clear"></div>

        {% elif order.order_status == 1 %}
            <!--待发货-->
            <div class="c-comment">
                <span class="c-comment-num">{{ order.payment }}</span>
                <span class="c-comment-suc">待发货</span>
            </div>

            <div class="c-comment-list" style="border: 0;">
                <a href="orderdetail.html">
                    <p>应付金额：￥{{ order.order_price }}</p>
                    <p>实付金额：<span>￥{{ order.pay_money }}</span><b>省</b><span>￥0.0</span></p>
                    <p>订单编号：{{ order.number }}</p>
                    <p>下单时间：{{ order.create_time }}</p>
                </a>
            </div>
            <div class="c-com-btn">
                <a href="" class="canelpay">取消订单</a>
            </div>
            <div class="clear"></div>

        {% elif order.order_status == 2 %}
            <!--待收货-->
            <div class="c-comment">
                <span class="c-comment-num">{{ order.payment }}</span>
                <span class="c-comment-suc">待收货</span>
            </div>

            <div class="c-comment-list" style="border: 0;">
                <a href="orderdetail.html">
                    <p>应付金额：￥{{ order.order_price }}</p>
                    <p>实付金额：<span>￥{{ order.pay_money }}</span><b>省</b><span>￥0.0</span></p>
                    <p>订单编号：{{ order.number }}</p>
                    <p>下单时间：{{ order.create_time }}</p>
                </a>
            </div>
            <div class="c-com-btn">
                <a href="" class="oncepay">确认收货</a>
                <a href="" class="canelpay">取消订单</a>
            </div>
            <div class="clear"></div>

        {% elif order.order_status == 3 %}
            <!--未评价-->
            <div class="c-comment">
                <span class="c-comment-num">{{ order.payment }}</span>
                <span class="c-comment-suc"> 待评价</span>
            </div>

            <div class="c-comment-list" style="border: 0;">
                <a href="orderdetail.html">
                    <p>应付金额：￥{{ order.order_price }}</p>
                    <p>实付金额：<span>￥{{ order.pay_money }}</span><b>省</b><span>￥0.0</span></p>
                    <p>订单编号：{{ order.number }}</p>
                    <p>下单时间：{{ order.create_time }}</p>
                </a>
            </div>
            <div class="c-com-btn">
                <a href="" class="oncepay">立即评价</a>
            </div>

        {% elif order.order_status == 4 %}
            <!--已完成-->
            <div class="c-comment">
                <span class="c-comment-num">{{ order.payment }}</span>
                <span class="c-comment-suc">已完成</span>
            </div>

            <div class="c-comment-list" style="border: 0;">
                <a href="orderdetail.html">
                   <p>应付金额：￥{{ order.order_price }}</p>
                    <p>实付金额：<span>￥{{ order.pay_money }}</span><b>省</b><span>￥0.0</span></p>
                    <p>订单编号：{{ order.number }}</p>
                    <p>下单时间：{{ order.create_time }}</p>
                </a>
            </div>
            <div class="c-com-btn">
                <a href="" class="oncepay">删除订单</a>
                <a href="" class="canelpay">投诉</a>
            </div>
            <div class="clear"></div>

        {% elif order.order_status == 5 %}
            <!--退发货-->
            <div class="c-comment">
                <span class="c-comment-num">{{ order.payment }}</span>
                <span class="c-comment-suc">退款中</span>
            </div>

            <div class="c-comment-list" style="border: 0;">
                <a href="orderdetail.html">
                   <p>应付金额：￥{{ order.order_price }}</p>
                    <p>实付金额：<span>￥{{ order.pay_money }}</span><b>省</b><span>￥0.0</span></p>
                    <p>订单编号：{{ order.number }}</p>
                    <p>下单时间：{{ order.create_time }}</p>
                </a>
            </div>
            <div class="c-com-btn">
                <a href="" class="oncepay">删除订单</a>
                <a href="" class="canelpay">投诉</a>
            </div>
            <div class="clear"></div>
        {% elif order.order_status == 6 %}
            <!--已取消-->
            <div class="c-comment">
                <span class="c-comment-suc">订单已取消</span>
            </div>

            <div class="c-comment-list" style="border: 0;">
                <a href="orderdetail.html">
                   <p>应付金额：￥{{ order.order_price }}</p>
                    <p>实付金额：<span>￥{{ order.pay_money }}</span><b>省</b><span>￥0.0</span></p>
                    <p>订单编号：{{ order.number }}</p>
                    <p>下单时间：{{ order.create_time }}</p>
                </a>
            </div>
            <div class="c-com-btn">
                <a href="" class="oncepay">删除订单</a>
            </div>
            <div class="clear"></div>
        {% endif %}
    {% endfor %}
{% endblock %}

{% block foot_js %}

{% endblock %}